package com.struct.graph.room
{
	import com.collection.FactoryCollection;
	
	import flash.display.DisplayObjectContainer;
	import flash.events.MouseEvent;
	
	import sacu.s.worker.GraphWorker;
	
	public class RoomGraphWorker extends GraphWorker
	{
		private var _base:RoomFrame;
		public function RoomGraphWorker(id:String, base:DisplayObjectContainer)
		{
			super(id, base);
			_base = base as RoomFrame;
			
			_base.btnSubmit.addEventListener(MouseEvent.CLICK, clickHandler);
		}
		
		private function clickHandler(e:MouseEvent):void{
			factory.disposeFactory();
			
			FactoryCollection.battle.startFactory();
		}
	}
}